package com.situ.day7;

public class Teacher extends Person{
    //private int id;
    //private String name;
    //private int age;
    //特有属性
    private double salary;

    public Teacher(double salary) {
        this.salary = salary;
    }

    public Teacher(int id, String name, int age, double salary) {
        //super(id, name, age);
        this.id = id;
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    @Override
    public void show() {
        System.out.println("Teacher.show");
    }

    //特有方法
    public void teach() {
        System.out.println(name + "正在教学");
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
